# 公共配置文件
# @author <a href="https://github.com/liyupi">程序员鱼皮</a>
# @from <a href="https://yupi.icu">编程导航知识星球</a>
spring:
  application:
    name: springboot-init
  # 默认 dev 环境
  profiles:
    active: dev
  # 支持 swagger3
  mvc:
    pathmatch:
      matching-strategy: ant_path_matcher
  # session 配置
  session:
    # todo 取消注释开启分布式 session（须先配置 Redis）
    # store-type: redis
    # 30 天过期
    timeout: 2592000
  # 数据库配置
  # todo 需替换配置
  datasource:
    driver-class-name: com.mysql.cj.jdbc.Driver
    url: ${mysqlConfig.url}
    username: ${mysqlConfig.username}
    password: ${mysqlConfig.password}
<#if needRedis>
   # Redis 配置
  # todo 需替换配置，然后取消注释
#  redis:
#    database: 1
#    host: localhost
#    port: 6379
#    timeout: 5000
#    password: RedisRoot 
</#if>
<#if needEs>
   # Elasticsearch 配置
  # todo 需替换配置，然后取消注释
#  elasticsearch:
#    uris: http://localhost:9200
#    username: elasticsearch
#    password: elasticsearchRoot 
</#if>
server:
  address: 0.0.0.0
  port: 8101
  servlet:
    context-path: /api
    # cookie 30 天过期
    session:
      cookie:
        max-age: 2592000
mybatis-plus:
  configuration:
    map-underscore-to-camel-case: false
    log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
  global-config:
    db-config:
      logic-delete-field: isDelete # 全局逻辑删除的实体字段名
      logic-delete-value: 1 # 逻辑已删除值（默认为 1）
      logic-not-delete-value: 0 # 逻辑未删除值（默认为 0）
